package com.jiaai.cloud.gift.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.jiaai.cloud.user.entity.TUser;
import org.apache.catalina.User;

import java.io.Serializable;

/**
 * <p>
 * 直播间礼物赠送表
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-01
 */
@TableName("t_live_gift_detail")
public class TLiveGiftDetail extends Model<TLiveGiftDetail> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;

	@TableField(exist = false)
	private  TLiveGift gift;
	@JSONField(serialize = false)
	private Long giftId;
    /**
     * 数量
     */
	private Integer number;
    /**
     * 单价
     */
	private Integer glod;
    /**
     * 当前直播间Id
     */
	private String broadcastId;
    /**
     * 主播Id
     */
	private String anchorId;

	/**
	 * 赠送人
	 */
	@TableField(exist = false)
	private TUser from;
    /**
     * 赠送人
     */
    @JSONField(serialize = false)
	private String sendFrom;
    /**
     * 赠送时间
     */
    @JSONField(format = "YYYY-MM-DD")
	private Date sendTime;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getGiftId() {
		return giftId;
	}

	public void setGiftId(Long giftId) {
		this.giftId = giftId;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public Integer getGlod() {
		return glod;
	}

	public void setGlod(Integer glod) {
		this.glod = glod;
	}

	public String  getBroadcastId() {
		return broadcastId;
	}

	public void setBroadcastId(String broadcastId) {
		this.broadcastId = broadcastId;
	}

	public String getAnchorId() {
		return anchorId;
	}

	public void setAnchorId(String anchorId) {
		this.anchorId = anchorId;
	}

	public String getSendFrom() {
		return sendFrom;
	}

	public void setSendFrom(String sendFrom) {
		this.sendFrom = sendFrom;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public TLiveGift getGift() {
		return gift;
	}

	public void setGift(TLiveGift gift) {
		this.gift = gift;
	}

	public TUser getFrom() {
		return from;
	}

	public void setFrom(TUser from) {
		this.from = from;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
